
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>es6模块化</title>
</head>
<body>  
    <!-- 模块化需要这两个文件支持 -->
    <script src="traceur.js"></script>
    <script src="bootstrap.js"></script>

    <script type="module">
        // 导入   import
        import { num, text, Hello } from './modules/main/modules1.js'
        import * as obj from './modules/main/modules1.js'


        console.log(num);
        console.log(text());
        console.log(new Hello("jack",28).showAge());


        console.log(obj.num);
        console.log(obj.text());
        console.log(new obj.Hello("jack",28).showAge());
        


    </script>
    <script type="module">
         // 导入  import
         import M  from './modules/main/modules2.js'

        console.log(M);
        console.log(M.num);
        console.log(M.test());
        console.log(new M.Hello("jack",19).showAge());

        
    </script>
    
</body>
</html>